package com.funo.wcity.app.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.funo.wcity.app.dao.TblContactPersonsDAO;
import com.funo.wcity.app.entity.TblContactPersons;
import com.funo.wcity.app.service.TblContactPersonsService;

@Service("tblContactPersonsService")
public class TblContactPersonsServiceImpl implements TblContactPersonsService {
	@Resource(name="tblContactPersonsDAO")
	private TblContactPersonsDAO tblContactPersonsDAO;
	
	public List getContactPersonslList(String idEmployees,Integer idCompanyType) {		
		return this.tblContactPersonsDAO.getContactPersonslList(idEmployees,idCompanyType);
	}
	
	public List<TblContactPersons> getContactPersonslListByHibernate(String idEmployees,Integer idCompany){
		return (List<TblContactPersons>)this.tblContactPersonsDAO.getContactPersonslListByHibernate(idEmployees,idCompany);
	}
	
	public List<TblContactPersons> getContactPersonslListByLike(String idEmployees,String queryStr){
		return (List<TblContactPersons>)this.tblContactPersonsDAO.getContactPersonslListByLike(idEmployees,queryStr);
	}

	public TblContactPersons getTblContactPersons(Integer idContactPerson) {
		return (TblContactPersons)this.tblContactPersonsDAO.get(idContactPerson);
	}
	
	public void createTblContactPersons(TblContactPersons person){
		this.tblContactPersonsDAO.save(person);
	}
	
	public void deleteTblContactPersons(String idContactPersons){
		this.tblContactPersonsDAO.deleteTblContactPersons(idContactPersons);
	}
	
	public TblContactPersons getTblContactPersons(String email) {
		return this.tblContactPersonsDAO.getTblContactPersons(email);
	}
	
	public void updateTblContactPersons(TblContactPersons person){
		this.tblContactPersonsDAO.update(person);
	}
}
